package com.example.dao;

import com.example.model.pojo.Tag;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * @Description //TODO
 * @Date 2022/9/13 19:09
 * @Author lonng
 **/
public interface TagDao extends JpaRepository<Tag,Integer> {
    Tag findAllByName(String name);
    @Query(value = "select * from tag  where id=?1",nativeQuery = true)
    Tag findByIds(Integer id);
}
